/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.sisportaria.bean;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 *
 * @author lac
 */
@Entity
@Table(name = "MOVIMENTACAO")
@NamedQueries({@NamedQuery(name = "Movimentacao.findAll", query = "SELECT m FROM Movimentacao m"), @NamedQuery(name = "Movimentacao.findByMvncodg", query = "SELECT m FROM Movimentacao m WHERE m.mvncodg = :mvncodg"), @NamedQuery(name = "Movimentacao.findByDtncodg", query = "SELECT m FROM Movimentacao m WHERE m.dtncodg = :dtncodg"), @NamedQuery(name = "Movimentacao.findByPsncodg", query = "SELECT m FROM Movimentacao m WHERE m.psncodg = :psncodg"), @NamedQuery(name = "Movimentacao.findByVtncodg", query = "SELECT m FROM Movimentacao m WHERE m.vtncodg = :vtncodg"), @NamedQuery(name = "Movimentacao.findByMvtinic", query = "SELECT m FROM Movimentacao m WHERE m.mvtinic = :mvtinic"), @NamedQuery(name = "Movimentacao.findByMvtfinl", query = "SELECT m FROM Movimentacao m WHERE m.mvtfinl = :mvtfinl"), @NamedQuery(name = "Movimentacao.findByMvnoini", query = "SELECT m FROM Movimentacao m WHERE m.mvnoini = :mvnoini"), @NamedQuery(name = "Movimentacao.findByMvnofin", query = "SELECT m FROM Movimentacao m WHERE m.mvnofin = :mvnofin"), @NamedQuery(name = "Movimentacao.findByMvddinic", query = "SELECT m FROM Movimentacao m WHERE m.mvddinic = :mvddinic"), @NamedQuery(name = "Movimentacao.findByMvddfinl", query = "SELECT m FROM Movimentacao m WHERE m.mvddfinl = :mvddfinl")})
public class Movimentacao implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "MVNCODG")
    private Integer mvncodg;
    @Column(name = "DTNCODG")
    private Integer dtncodg;
    @Column(name = "PSNCODG")
    private Integer psncodg;
    @Column(name = "VTNCODG")
    private Integer vtncodg;
    @Column(name = "MVTINIC")
    @Temporal(TemporalType.TIME)
    private Date mvtinic;
    @Column(name = "MVTFINL")
    @Temporal(TemporalType.TIME)
    private Date mvtfinl;
    @Column(name = "MVNOINI")
    private Integer mvnoini;
    @Column(name = "MVNOFIN")
    private Integer mvnofin;
    @Column(name = "MVDDINIC")
    @Temporal(TemporalType.DATE)
    private Date mvddinic;
    @Column(name = "MVDDFINL")
    @Temporal(TemporalType.DATE)
    private Date mvddfinl;

    public Movimentacao() {
    }

    public Movimentacao(Integer mvncodg) {
        this.mvncodg = mvncodg;
    }

    public Integer getMvncodg() {
        return mvncodg;
    }

    public void setMvncodg(Integer mvncodg) {
        Integer oldMvncodg = this.mvncodg;
        this.mvncodg = mvncodg;
        changeSupport.firePropertyChange("mvncodg", oldMvncodg, mvncodg);
    }

    public Integer getDtncodg() {
        return dtncodg;
    }

    public void setDtncodg(Integer dtncodg) {
        Integer oldDtncodg = this.dtncodg;
        this.dtncodg = dtncodg;
        changeSupport.firePropertyChange("dtncodg", oldDtncodg, dtncodg);
    }

    public Integer getPsncodg() {
        return psncodg;
    }

    public void setPsncodg(Integer psncodg) {
        Integer oldPsncodg = this.psncodg;
        this.psncodg = psncodg;
        changeSupport.firePropertyChange("psncodg", oldPsncodg, psncodg);
    }

    public Integer getVtncodg() {
        return vtncodg;
    }

    public void setVtncodg(Integer vtncodg) {
        Integer oldVtncodg = this.vtncodg;
        this.vtncodg = vtncodg;
        changeSupport.firePropertyChange("vtncodg", oldVtncodg, vtncodg);
    }

    public Date getMvtinic() {
        return mvtinic;
    }

    public void setMvtinic(Date mvtinic) {
        Date oldMvtinic = this.mvtinic;
        this.mvtinic = mvtinic;
        changeSupport.firePropertyChange("mvtinic", oldMvtinic, mvtinic);
    }

    public Date getMvtfinl() {
        return mvtfinl;
    }

    public void setMvtfinl(Date mvtfinl) {
        Date oldMvtfinl = this.mvtfinl;
        this.mvtfinl = mvtfinl;
        changeSupport.firePropertyChange("mvtfinl", oldMvtfinl, mvtfinl);
    }

    public Integer getMvnoini() {
        return mvnoini;
    }

    public void setMvnoini(Integer mvnoini) {
        Integer oldMvnoini = this.mvnoini;
        this.mvnoini = mvnoini;
        changeSupport.firePropertyChange("mvnoini", oldMvnoini, mvnoini);
    }

    public Integer getMvnofin() {
        return mvnofin;
    }

    public void setMvnofin(Integer mvnofin) {
        Integer oldMvnofin = this.mvnofin;
        this.mvnofin = mvnofin;
        changeSupport.firePropertyChange("mvnofin", oldMvnofin, mvnofin);
    }

    public Date getMvddinic() {
        return mvddinic;
    }

    public void setMvddinic(Date mvddinic) {
        Date oldMvddinic = this.mvddinic;
        this.mvddinic = mvddinic;
        changeSupport.firePropertyChange("mvddinic", oldMvddinic, mvddinic);
    }

    public Date getMvddfinl() {
        return mvddfinl;
    }

    public void setMvddfinl(Date mvddfinl) {
        Date oldMvddfinl = this.mvddfinl;
        this.mvddfinl = mvddfinl;
        changeSupport.firePropertyChange("mvddfinl", oldMvddfinl, mvddfinl);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (mvncodg != null ? mvncodg.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Movimentacao)) {
            return false;
        }
        Movimentacao other = (Movimentacao) object;
        if ((this.mvncodg == null && other.mvncodg != null) || (this.mvncodg != null && !this.mvncodg.equals(other.mvncodg))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.sisportaria.view.Movimentacao[mvncodg=" + mvncodg + "]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }

}
